package com.huang.community.service;

import com.baomidou.mybatisplus.extension.service.IService;

import com.huang.community.pojo.LoginTicket;
import com.huang.community.pojo.User;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.stereotype.Service;
//import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.List;
import java.util.Map;
@Service
public interface UserService extends IService<User> {
    public User findUserById(int id);
    public Map<String, Object> register(User user);
    public int activation(int userId, String code);
    public Map<String, Object> login(String username, String password, int expiredSeconds);
    public void logout(String ticket);
    public LoginTicket findLoginTicket(String ticket);
    public int updateHeader(Integer userId,String header_url);




    public Map<String,Object> updatePassword(String oldPassword, String newPassword, String confirmPassword);
    Collection<? extends GrantedAuthority> getAuthorities(int userId);
    public User selectUserByname(String username);
}
